package online.test1;

/**
 * @Author 28021
 * @Date 2022/10/11
 */
public class StaticTest {
}
class Class1Stu{
    static String name;
    static int age;
    static String gender;

    public Class1Stu() {
    }

    public Class1Stu(String name, int age, String gender) {
        this.name = name;
        this.age = age;
        this.gender = gender;
    }

    /**
     * 获取
     * @return name
     */
    public static String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public static void setName(String name) {
        Class1Stu.name = name;
    }

    /**
     * 获取
     * @return age
     */
    public static int getAge() {
        return age;
    }

    /**
     * 设置
     * @param age
     */
    public static void setAge(int age) {
        Class1Stu.age = age;
    }

    /**
     * 获取
     * @return gender
     */
    public static String getGender() {
        return gender;
    }

    /**
     * 设置
     * @param gender
     */
    public static void setGender(String gender) {
        Class1Stu.gender = gender;
    }

    void study(){
        System.out.println(name+"正在学习");
    }

    void show(){
        System.out.println(name+","+age+","+gender);
    }
}
